{{include file="VIEW_PATH/header.php"/}}
<body>
<form method="post">
    <if value="!$data">
        <input type="hidden" name="pid" value="0">
    </if>
    <table class="hd-table hd-table-form hd-form">

        <thead>
        <tr>
            <td colspan="2">文章发表</td>
        </tr>
        </thead>
        <tbody>
        <if value="$data">
            <tr>
                <th width="100">父级</th>
                <td>
                    <select name="pid">
                        <option value="0">顶级栏目</option>
                        {{foreach from="$data" key="$k" value="$v"}}
                            <option value="{{$v['id']}}"
                            <if value="$pid==$v['id']">
                                selected=""
                            </if>
                            >{{$v['_name']}}</option>

                        {{endforeach}}
                    </select>

                </td>
            </tr>
        </if>

        <tr>
            <th>栏目名称</th>
            <td>
                <input type="text" name="catname" class="hd-w300">
            </td>
        </tr>
        <tr>
            <th>访问方式</th>
            <td>
                <input type="radio" name="type" value="1" checked> 动态
                <input type="radio" name="type" value="2"> 静态
            </td>
        </tr>
        <tr>
            <th>关键词</th>
            <td>
                <input type="text" name="catkeyword" class="hd-w300">
            </td>
        </tr>
        <tr>
            <th>列表页模板</th>
            <td>
                <input type="text" name="cattpl" value="list.html" class="hd-w300">
            </td>
        </tr>
        <tr>
            <th>内容页模板</th>
            <td>
                <input type="text" name="arctpl" value="article.html" class="hd-w300">
            </td>
        </tr>
        <tr>
            <th>静态目录</th>
            <td>
                <input type="text" name="dir" required="" value="" class="hd-w300">
            </td>
        </tr>
        <tr>
            <th>内容页静态规则</th>
            <td>
                <input type="text" name="archtml" required="" value="{dir}/{y}_{m}_{id}.html" class="hd-w300">
						<span class="hd-validate-notice" style="display: inline-block;">
							{dir}静态目录{cid}栏目id{y}年{m}月{d}日{id}文章id
						</span>
            </td>
        </tr>
        <tr>
            <th>描述</th>
            <td>
                <textarea name="catdesc" class="hd-w500 hd-h100"></textarea>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" class="hd-btn hd-btn-primary">
            </td>
        </tr>
        </tbody>
    </table>
</form>
</body>
</html>